package com.strategy;

public class CashReturn extends CashSuper {

	private double moneyCondition;
	private double moneyReturn;
	

	public CashReturn(double moneyCondition, double moneyReturn) {
		super();
		this.moneyCondition = moneyCondition;
		this.moneyReturn = moneyReturn;
	}


	@Override
	public double acceptCash(double money) {
		if (money > moneyCondition) {
			return money - moneyReturn;
		}
		return money;
	}

}
